## Azimuthal Equidistant (Spherical)

### Definitions from Snyder

c: acos(sinφ_0*sin(φ) + cosφ_0*cos(φ)*cos(λ));

k: c/sin(c);

x: k * cos(φ)*sin(λ);

y: k * (cosφ_0*sin(φ) - sinφ_0*cos(φ)*cos(λ));

### Redundant terms

Following terms are repeated many times in the derivative results. For making formulas smaller, they will be substituted.

cosc: cos(c);

sin2c: 1-cosc²;

### Derivative

Only one derivative is shown. To see the others, edit the variables in diff(x,λ). For making formulas smaller, some terms are substituted by the variables defined above. The substituted variables have the "s" subscript for differentiating them from the definitions above.

subst(cosc_s, cosc, subst(sin2c_s, sin2c, subst(c_s, c, subst(k_s, k, subst(y_s, y, subst(x_s, x, diff(x,λ)))))));

## Verification

### Definitions specific to derivative formulas

sφcλ: sin(φ) * cos(λ);

cφcλ: cos(φ) * cos(λ);

cφsλ: cos(φ) * sin(λ);

t: (1/k - cosc) / (1 - cosc*cosc);

tλ: cφsλ * cosφ_0*t;

tφ: (cosφ_0*sφcλ - sinφ_0*cos(φ)) * t;

### Differences between Java code and expected result

Results should be 0 everywhere.

ratsimp(x*tλ + k*cφcλ - diff(x,λ));

ratsimp(x*tφ - k*sin(λ)*sin(φ) - diff(x,φ));

ratsimp(y*tλ + x*sinφ_0 - diff(y,λ));

ratsimp(y*tφ + k*(sinφ_0*sφcλ + cosφ_0*cos(φ)) - diff(y,φ));

## Limit for values close to zero

In formulas below, the "c", "k" and "t" variables are renamed "cl", "kl" and "tl" for avoiding collision with variable declared above.

k_l: c_l/sin(c_l);

t_l: (1/k_l - cos(c_l)) / (sin(c_l))²;

limit(t_l, c_l, 0);